package com.xk.demo.user.respository;

import com.xk.demo.mybatis.entity.PtMenuEntity;
import com.xk.demo.mybatis.entity.PtUserEntity;
import com.xk.demo.mybatis.flexigrid.PagingBean;
import com.xk.demo.mybatis.ztree.ZtreeEntity;
import com.xk.demo.user.entity.UserSearchEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Mapper
public interface UserDao {
    PtUserEntity queryUserInfoByUserName(@Param("userName") String userName);
    List<PtMenuEntity> queryMenuInfoByUserLang(@Param("userUuid") String userUuid, @Param("lang") String lang);

    Integer queryUserListTotal(@Param("search") UserSearchEntity search);

    List<PtUserEntity> queryUserListByPading(@Param("search") UserSearchEntity search, @Param("paging") PagingBean paging);
    void deleteUserById(@Param("userUuid") String userUuid);

    List<ZtreeEntity> getRoleZtreeList();

    void deleteUserRefRole(@Param("userUuid") String userUuid);

    void insertUserRefRole(@Param("userUuid") String userUuid,@Param("roleUuid")  String roleUuid);

    List<String> queryRoleRefUserByUserId(@Param("userUuid") String userUuid);

    List<String> queryMenuInfoList(@Param("userUuid") String userUuid);
    void addUser(@Param("user") PtUserEntity user,@Param("nousedate") Timestamp nousedate);
    void updateUserByUserId(@Param("user") PtUserEntity user,@Param("nousedate")Timestamp nousedate);
}
